home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / UTIL / ES 1.2 Package.sit / ES 1.2 Package / Developer’s toolkit / Why ES savvy modules? < prev   
Text File  |  1995-12-09  |  3KB  |  69 lines

  1. { /*
  2.  
  3. ・ As posted to comp.sys.mac.programmer.info:
  4.  
  5. - supports PPC native modules.  (The Control Strip traps are linked to
  6. ExtensionsStripLib, a shared library.)
  7.  
  8. - safe sending of AppleEvents, new drags, ect.  (Made possible because modules
  9. can request a piece of Extensions Strip's application context.)
  10.  
  11. - event record checking/modification.  Modules can look at the current event
  12. record whenever they are called.  Modules can also request to peek at and modify
  13. all events, like jGNE filters do, but with an event mask to cut down on
  14. overhead.
  15.  
  16. - better environment recognition.  Modules can obtain their total real estate on
  17. the strip and can sense the strip's orientation and color scheme.
  18.  
  19. - greater overall freedom.  Modules can display an area of any size, request not
  20. to be hilited when clicked, and can even change their features at any time.
  21.  
  22.  
  23. ・ "ES compatible" checklist:
  24.  
  25. - All memory that was ever permanently allocated is disposed of when the
  26. sdevCloseModule selector is called.
  27.  
  28. - Modules that draw text return a display width based upon a calculation of
  29. the string's width.  This is also a requirement for modules under Control Strip
  30. version 1.2 and later because of the strip's configurable font/size.
  31.  
  32. - All dialogs are loaded/created "on the fly".  Not doing so, as Apple's
  33. FileSharing & AppleTalk modules currently do, make the windows context-dependent
  34. of the process they loaded in.  BTW, these modules will crash under Control Strip
  35. if you quit the Finder.  That's Apple for you.
  36.  
  37.  
  38. ・ "ES savvy" checklist for existing modules:
  39.  
  40. - All AppleEvents are sent safely (SBSimpleAESend() is the easiest way to do
  41. this.)
  42.  
  43. - The sdevDontPeriodicTickle bit is returned with the features if no idle events
  44. are required.  Be nice and return this if you don't need idle time!
  45.  
  46. - Modifier key and mouse position checks are performed by reading from the event
  47. record with a call to SBGetCurrentEvent().  This ensures that the user's
  48. wishes are carried out.  If they, for instance, click on your module with
  49. the shift key down while the CPU was busy, then your module can tell that the
  50. shift key actually was down for the click, even though the key may have been
  51. released before your module finally got called.
  52.  
  53. - Support of ES' integrated drag stuff:
  54.     1.    return the sdevHasDragHandlers bit with the features if a drag handler
  55.         is installed.
  56.     2.    use the sdevDragAccept selector to return whether your drag handler(s)
  57.         accept the current drag or not.
  58.     3.    the drag handler(s) call SBGetTotalModuleBounds() to find the total
  59.         dragable space.
  60.     4.    new drags are started from within ES' context so that they may leave
  61.         the strip.
  62.  
  63. - Alias resolving is performed intelligently.  See the "Intelligent Alias
  64. Resolving" section of the Programming Notes file for info on this.
  65.  
  66. - Any other ES API stuff is supported by the module.
  67.  
  68. */ }
  69.